<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<jsp:useBean id="utilities" class="masterpiece.util.Utilities" scope="session" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="css/default.css" />
<title>Main Menu</title>
</head>
<body>
  <%@ include file="top_menu.jsp" %>
  
  <%
  if (!utilities.isConnected()) {
    try {
      utilities.openDB(request.getParameter("userName"), request.getParameter("password"));
      out.print("<p class=\"message success\">Connected successfully.</p>");
    } catch (Exception e) {
      out.print("<p class=\"message error\">Error when connecting to DB: "+e.getMessage()+"</p>");
    }
  }
  %>
  
  <h1>Main Menu</h1>
  
  <ul id="main_menu">
    <li><a href="addarticle1.jsp">Submit article</a></li>
    <li><a href="findupdatearticle.jsp">Update article</a></li>
    <li><a href="picData.jsp">Submit picture</a></li>
    <li><a href="deletePic.jsp">Delete picture</a></li>
    <li><a href="adduser.jsp">Add user</a></li>
    <li><a href="search.jsp">Search archive</a></li>
    <li><a href="logout.jsp">Log out</a></li>
  </ul>
  
</body>
</html>